<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <title>主要内容区main</title>
    <link href="__PUBLIC__/Css/admin/css.css" type="text/css" rel="stylesheet"/>
    <link href="__PUBLIC__/Css/admin/main.css" type="text/css" rel="stylesheet"/>
    <link rel="shortcut icon" href="__PUBLIC__/Images/admin/favicon.ico"/>
    <script type="text/javascript" src="__PUBLIC__/Js/admin/jquery.js"></script>
   <!--  <script type="text/javascript" src="__PUBLIC__/Js/admin/jquery.validate.js"></script>
    <script type="text/javascript" src="__PUBLIC__/Js/admin/messages_zh.js"></script> -->
 <!--    <script>
        $(function() {
            $("#form").validate({
                rules:{
                    stock:{required:true,digits:true},
                    ct:{required:true,number:true},
                    price:{required:true,digits:true}
                },
                messages:{
                  stock:{required:'不能为空'},
                  ct:{required:'不能为空'},
                  price:{required:'不能为空'}
                }
            });

        });
    </script> -->
    <style>
        body {
            overflow-x: hidden;
            background: #f2f0f5;
            padding: 15px 0px 10px 5px;
        }

        #searchmain {
            font-size: 12px;
        }

        #search {
            font-size: 12px;
            background: #548fc9;
            margin: 10px 10px 0 0;
            display: inline;
            widtd: 100%;
            color: #FFF;
            float: left
        }

        #search form span {
            height: 40px;
            line-height: 40px;
            padding: 0 0px 0 10px;
            float: left;
        }

        #search form input.text-word {
            height: 24px;
            line-height: 24px;
            widtd: 180px;
            margin: 8px 0 6px 0;
            padding: 0 0px 0 10px;
            float: left;
            border: 1px solid #FFF;
        }

        #search form input.text-but {
            height: 24px;
            line-height: 24px;
            widtd: 55px;
            background: url(images/main/list_input.jpg) no-repeat left top;
            border: none;
            cursor: pointer;
            font-family: "Microsoft YaHei", "Tahoma", "Arial", '宋体';
            color: #666;
            float: left;
            margin: 8px 0 0 6px;
            display: inline;
        }

        #search a.add {
            background: url(__PUBLIC__/Images/admin/add.jpg) no-repeat -3px 7px #548fc9;
            padding: 0 10px 0 26px;
            height: 40px;
            line-height: 40px;
            font-size: 14px;
            font-weight: bold;
            color: #FFF;
            float: right
        }

        #search a:hover.add {
            text-decoration: underline;
            color: #d2e9ff;
        }

        #main-tab {
            border: 1px solid #eaeaea;
            background: #FFF;
            font-size: 12px;
        }

        #main-tab td {
            font-size: 12px;
            height: 32px;
            line-height: 32px;
        }

        #main-tab td {
            font-size: 12px;
            line-height: 40px;
        }

        #main-tab td a {
            font-size: 12px;
            color: #548fc9;
        }

        #main-tab td a:hover {
            color: #565656;
            text-decoration: underline;
        }

        .bordertop {
            border-top: 1px solid #ebebeb
        }

        .borderright {
            border-right: 1px solid #ebebeb
        }

        .borderbottom {
            border-bottom: 1px solid #ebebeb
        }

        .borderleft {
            border-left: 1px solid #ebebeb
        }

        .gray {
            color: #dbdbdb;
        }

        td.fenye {
            padding: 10px 0 0 0;
            text-align: right;
        }

        .bggray {
            background: #f9f9f9
        }
    </style>
</head>
<body>
<!--main_top-->
<table width="99%" border="0" cellspacing="0" cellpadding="0" id="searchmain">
    <tr>
        <td width="99%" align="left" valign="top">您的位置：商品管理</td>
    </tr>
    <tr>
        <td align="left" valign="top">
            <table width="100%" border="0" cellspacing="0" cellpadding="0" id="search">
                <tr>
                    <td width="90%" align="left" valign="middle">
                        <form method="post" action="__MODULE__/Goods/goodsSelect">
                            <span>商品：</span>
                            <input type="text" name="name" value="" class="text-word">
                            <a href="__MODULE__/Goods/goodsSelect">查询</a>
                            <!--<input name="" type="submit" value="查询" class="text-but">-->
                        </form>
                    </td>
                    <td width="10%" align="center" valign="middle" style="text-align:right; widtd:150px;"><a
                            href="__MODULE__/Goods/goodsAdd" target="mainFrame" onFocus="tdis.blur()" class="add">添加商品</a></td>
                </tr>
            </table>
        </td>
    </tr>
 <table id="main-tab" width="100%" cellspacing="0" cellpadding="0" border="0">
    <form id="form" method="post" action="__MODULE__/Goods/goodsDetailModifyAction">
        <input type="hidden" name="id" value="{$arr.id}"/>
        <input type="hidden" name="goods_id" value="{$arr.goods_id}"/>

       
            <tr>
                <td align="center" valign="middle" class="borderright borderbottom">商品属性编号</td>
                <td align="center" valign="middle" class="borderright borderbottom">{$arr.id}</td>
            </tr>

            <tr>
                <td align="center" valign="middle" class="borderright borderbottom">商品id</td>
                <td align="center" valign="middle" class="borderright borderbottom">{$arr.goods_id}</td>
            </tr>
            <tr>
                <td align="center" valign="middle" class="borderright borderbottom">库存</td>
                <td align="center" valign="middle" class="borderright borderbottom">
                    <input type="text" id="stock" name="stock" value="{$arr['stock']}"/>
                    </td>
            </tr>
            <tr>
                <td align="center" valign="middle" class="borderright borderbottom">材质</td>
                <td align="center" valign="middle" class="borderright borderbottom"><select name="material">
                    <option value="0" <if condition="$arr['material'] eq 0">selected="selected"</if>>白18K金</option>
                    <option value="1" <if condition="$arr['material'] eq 1">selected='selected'</if>>PT950</option>
                </select>
                </td>
            </tr>
            <tr>
                <td align="center" valign="middle" class="borderright borderbottom">钻石重量</td>
                <td align="center" valign="middle" class="borderright borderbottom">
                    <input type="text" name="ct" id="ct" value="{$arr.ct}"/></td>
            </tr>

            <tr>
                <td align="center" valign="middle" class="borderright borderbottom">钻石颜色</td>
                <td align="center" valign="middle" class="borderright borderbottom"><select name="color">
                    <option value="D" <if condition="$arr['color'] eq D">selected='selected'</if>>D</option>
                    <option value="E" <if condition="$arr['color'] eq E">selected='selected'</if>>E</option>
                    <option value="F" <if condition="$arr['color'] eq F">selected='selected'</if>>F</option>
                    <option value="G" <if condition="$arr['color'] eq G">selected='selected'</if>>G</option>
                    <option value="H" <if condition="$arr['color'] eq H">selected='selected'</if>>H</option>
                    <option value="I" <if condition="$arr['color'] eq I">selected='selected'</if>>I</option>
                    <option value="J" <if condition="$arr['color'] eq J">selected='selected'</if>>J</option>
                    <option value="K" <if condition="$arr['color'] eq K">selected='selected'</if>>K</option>
                </select></td>
            </tr>

            <tr>
                <td align="center" valign="middle" class="borderright borderbottom">钻石净度</td>
                <td align="center" valign="middle" class="borderright borderbottom"><select name="clarity">
                    <option value="IF">IF</option>
                    <option value="VVS1" <if condition="$arr['clarity'] eq VVS1">selected='selected'</if>>VVS1</option>
                    <option value="VVS2" <if condition="$arr['clarity'] eq VVS2">selected='selected'</if>>VVS2</option>
                    <option value="VS1" <if condition="$arr['clarity'] eq VS1">selected='selected'</if>>VS1</option>
                    <option value="VS2" <if condition="$arr['clarity'] eq VS2">selected='selected'</if>>VS2</option>
                    <option value="SI1" <if condition="$arr['clarity'] eq SI1">selected='selected'</if>>SI1</option>
                    <option value="SI2" <if condition="$arr['clarity'] eq SI2">selected='selected'</if>>SI2</option>

                </select></td>
            </tr>
            <tr>
                <td align="center" valign="middle" class="borderright borderbottom">钻石切工</td>
                <td align="center" valign="middle" class="borderright borderbottom"><select name="cut">
                    <option value="Ideal" <if condition="$arr['cut'] eq Ideal">selected='selected'</if>>Ideal</option>
                    <option value="EX" <if condition="$arr['cut'] eq EX">selected='selected'</if>>EX</option>
                    <option value="VG" <if condition="$arr['cut'] eq VG">selected='selected'</if>>VG</option>
                    <option value="GD" <if condition="$arr['cut'] eq GD">selected='selected'</if>>GD</option>
                    <option value="Fair" <if condition="$arr['cut'] eq Fair">selected='selected'</if>>Fair</option>


                </select></td>
            </tr>
            <tr>
                <td align="center" valign="middle" class="borderright borderbottom">抛光</td>
                <td align="center" valign="middle" class="borderright borderbottom"><select name="buffing">
                    <option value="EX" <if condition="$arr['buffing'] eq EX">selected='selected'</if>>EX</option>
                    <option value="VG" <if condition="$arr['buffing'] eq VG">selected='selected'</if>>VG</option>
                    <option value="GD" <if condition="$arr['buffing'] eq GD">selected='selected'</if>>GD</option>
                    <option value="Fair" <if condition="$arr['buffing'] eq Fair">selected='selected'</if>>Fair</option>
                </select></td>
            </tr>
            <tr>
                <td align="center" valign="middle" class="borderright borderbottom">对称</td>
                <td align="center" valign="middle" class="borderright borderbottom"><select name="symmetry">
                    <option value="EX" <if condition="$arr['symmetry'] eq EX">selected='selected'</if>>EX</option>
                    <option value="VG" <if condition="$arr['symmetry'] eq VG">selected='selected'</if>>VG</option>
                    <option value="GD" <if condition="$arr['symmetry'] eq GD">selected='selected'</if>>GD</option>
                    <option value="Fair" <if condition="$arr['symmetry'] eq Fair">selected='selected'</if>>Fair</option>
                </select></td>
            </tr>
            <tr>
                <td align="center" valign="middle" class="borderright borderbottom">荧光</td>
                <td align="center" valign="middle" class="borderright borderbottom"><select name="fluorescence">
                    <option value="NON" <if condition="$arr['fluorescence'] eq NON">selected='selected'</if>>NON</option>
                    <option value="FNT" <if condition="$arr['fluorescence'] eq FNT">selected='selected'</if>>FNT</option>
                    <option value="MED" <if condition="$arr['fluorescence'] eq MED">selected='selected'</if>>MED</option>
                    <option value="STG" <if condition="$arr['fluorescence'] eq STG">selected='selected'</if>>STG</option>
                </select></td>
            </tr>
            <tr>
                <td align="center" valign="middle" class="borderright borderbottom">价格</td>
                <td align="center" valign="middle" class="borderright borderbottom">
                    <input type="text" name="price" id='price' value="{$arr.price}"/></td>
            </tr>
            <tr>
                <td align="center" valign="middle" class="borderright borderbottom">操作</td>
                <td align="center" valign="middle" class="borderright borderbottom">
                    <input type="submit" id='sub' value="提交"/>
                    <span class="gray">&nbsp;|&nbsp;</span><input type="reset" value="重置"></td>
            </tr>

</form>
        </table>
    </table>
</body>
</html>
<script>

    $('#sub').click(function(){
        var stock= $.trim($('#stock').val());
        var ct= $.trim($('#ct').val());
        var price= $.trim($('#price').val());
        //alert(stock);
        if (stock && ct && price) {
            $('form').submit();

        }else{
            alert('内容不能为空');
        }
    });


</script>
